package com.lagou.controller;


import com.lagou.ResquestIp;
import com.lagou.bean.ConsumerComponent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import java.net.InetAddress;

@Controller
public class IndexController {



    @Autowired
    private ConsumerComponent consumerComponent;

    @RequestMapping("/getMethod")
    @ResponseBody
    public String toIndex() throws InterruptedException {


        String hello = consumerComponent.methodA("world", 0);
        System.out.println("result :" + hello);


        return "hello world";
    }



//    @RequestMapping("/toIndex")
//    public String list(){
//
//        return "client/index";
//
//    }


}
